package cn.bigcontainer.alt.workflow.dto;

import cn.bigcontainer.alt.common.po.Po;
import cn.bigcontainer.alt.workflow.po.MTaskInstance;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class MTaskInstanceDto extends MTaskInstance {

    private static final String [] operationNames = {"保存", "提交", "同意", "拒绝并打回", "拒绝并结束", "转发"};

    public static final Integer OPERATION_SAVE = 0;

    public static final Integer OPERATION_SUBMIT = 1;

    public static final Integer OPERATION_APPROVAL = 2;

    public static final Integer OPERATION_REFUSED_BACK = 3;

    public static final Integer OPERATION_REFUSED_OVER = 4;

    public static final Integer OPERATION_FORWARD = 5;

    public MTaskInstanceDto(Po po) {
        super(po);
    }

    public MTaskInstanceDto() {
    }

    public static String getOperationName (int operation) {
        return operationNames[operation];
    }

    public String getOperationName () {
        return getOperationName(this.operation);
    }
}
